<? if(!defined('IN_TIPASK')) exit('Access Denied'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><? $user=$this->user; $setting=$this->setting; ?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tipask's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=TIPASK_CHARSET?>">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
</head>
<body>

<div id="append">
</div>

<script src="js/admin.js" type="text/javascript"></script>
<div class="container"><? if(isset($message)) { $type=isset($type)?$type:'correctmsg';  ?><div class="<?=$type?>"><p><?=$message?></p></div><? } ?><div class="mainbox nomargin">
<form action="index.php?admin_setting/mail<?=$setting['seo_suffix']?>" method="post">
<table class="opt">
<tr>
<th colspan="2">邮件来源地址:</th>
</tr>
<tr>
<td><input value="<?=$setting['maildefault']?>" name="maildefault"></td>
<td>当发送邮件不指定邮件来源时，默认使用此地址作为邮件来源</td>
</tr>
<tr>
<th colspan="2">邮件发送方式:</th>
</tr>
<tr>
<td colspan="2"><label>
<input class="radio" onclick="$('hidden1').style.display = 'none';$('hidden2').style.display = 'none';" type="radio"  <? if(1==$setting['mailsend'] ) { ?>checked<? } ?> value="1" name="mailsend"> 
通过 PHP 函数的 sendmail 发送(推荐此方式)</label><br>
<label>
<input class="radio" onclick="$('hidden1').style.display = '';$('hidden2').style.display = '';" type="radio" <? if(2==$setting['mailsend'] ) { ?>checked<? } ?> value="2"   name="mailsend"> 
通过 SOCKET 连接 SMTP 服务器发送(支持 ESMTP 验证)</label><br>
<label>
<input class="radio" onclick="$('hidden1').style.display = '';$('hidden2').style.display = 'none';" type="radio" <? if(3==$setting['mailsend'] ) { ?>checked<? } ?> value="3"  name="mailsend"> 
通过 PHP 函数 SMTP 发送 Email(仅 Windows 主机下有效, 不支持 ESMTP 验证)</label>
</td>
</tr>
<tbody id="hidden1" <? if(1==$setting['mailsend'] ) { ?> style="DISPLAY: none" <? } ?> >
<tr>
<td colspan="2">SMTP 服务器:</td>
</tr>
<tr>
<td>
<input class="txt" value="<?=$setting['mailserver']?>" name="mailserver">
</td>
<td valign="top">设置 SMTP 服务器的地址</td>
</tr>
<tr>
<td colspan="2">SMTP 端口:</td>
</tr>
<tr>
<td><input value="<?=$setting['mailport']?>" name="mailport"> </td>
<td valign="top">设置 SMTP 服务器的端口，默认为 25</td>
</tr>
</tbody>
<tbody id="hidden2" <? if(1==$setting['mailsend'] || 3==$setting['mailsend'] ) { ?> style="DISPLAY: none" <? } ?> >
<tr>
<td colspan="2">SMTP 服务器要求身份验证:</td>
</tr>
<tr>
<td><label>
<input class="radio" type="radio" <? if(1==$setting['mailauth'] ) { ?>checked<? } ?>  value="1" name="mailauth">是</label>
<label>
<input class="radio" type="radio" <? if(0==$setting['mailauth'] ) { ?>checked<? } ?>  value="0" name="mailauth">否</label>
</td>
<td valign="top">如果 SMTP 服务器要求身份验证才可以发信，请选择“是”</td>
</tr>
<tr>
<td colspan="2">发信人邮件地址:</td>
</tr>
<tr>
<td>
<input class="txt" value="<?=$setting['mailfrom']?>" name="mailfrom">
</td>
<td valign="top">如果需要验证, 必须为本服务器的邮件地址。邮件地址中如果要包含用户名，格式为“username 
&lt;user@domain.com&gt;”</td>
</tr>
<tr>
<td colspan="2">SMTP 身份验证用户名:</td>
</tr>
<tr>
<td>
<input value="<?=$setting['mailauth_username']?>" name="mailauth_username">
</td>
<td valign="top"></td>
</tr>
<tr>
<td colspan="2">SMTP 身份验证密码:</td>
</tr>
<tr>
<td><input value="<?=$setting['mailauth_password']?>" name="mailauth_password">
</td>
<td valign="top"></td>
</tr>
</tbody>
<tr>
<th colspan="2">邮件头的分隔符:</th>
</tr>
<tr>
<td><label>
<input class="radio" type="radio" <? if(1==$setting['maildelimiter'] ) { ?>checked<? } ?> value="1" name="maildelimiter"> 
使用 CRLF 作为分隔符</label><br>
<label>
<input class="radio" type="radio" <? if(0==$setting['maildelimiter'] ) { ?>checked<? } ?>  value="0" name="maildelimiter"> 
使用 LF 作为分隔符</label><br>
<label>
<input class="radio" type="radio" <? if(2==$setting['maildelimiter'] ) { ?>checked<? } ?> value="2" name="maildelimiter"> 
使用 CR 作为分隔符</label> </td>
<td>请根据您邮件服务器的设置调整此参数 </td>
</tr>
<tr>
<th colspan="2">收件人地址中包含用户名:</th>
</tr>
<tr>
<td><label>
<input class="radio" type="radio" <? if(1==$setting['mailusername'] ) { ?>checked<? } ?>  value="1" name="mailusername">是</label>
<label>
<input class="radio" type="radio" <? if(0==$setting['mailusername'] ) { ?>checked<? } ?>  value="0" name="mailusername">否</label>
</td>
<td valign="top">选择“是”将在收件人的邮件地址中包含论坛用户名</td>
</tr>
<tr>
<th colspan="2">屏蔽邮件发送中的全部错误提示:</th>
</tr>
<tr>
<td><label>
<input class="radio" type="radio" <? if(1==$setting['mailsilent'] ) { ?>checked<? } ?> value="1" name="mailsilent">是</label>
<label>
<input class="radio" type="radio" <? if(0==$setting['mailsilent'] ) { ?>checked<? } ?> value="0" name="mailsilent">否</label>
</td>
<td valign="top">&nbsp;</td>
</tr>
</table>
<div class="opt">
<input class="btn" tabindex="3" type="submit" value=" 提 交 " name="submit"></div>
</form>
</div>
</div>

</body>

</html>
